#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin >> t;
    int dp[6];
    while (t--)
    {
        for (int i = 0; i < 6; i++)
        {
            cin >> dp[i];
        }
        bool found=false;
        for (int i = 0; i < 6; i++)
        {
            for (int j = i + 1; j < 6; j++)
            {

                for (int k = j + 1; k < 6; k++)
                {

                    vector<int> tem1;
                    tem1.push_back(dp[i]);
                    tem1.push_back(dp[j]);
                    tem1.push_back(dp[k]);
                    sort(tem1.begin(),tem1.end());
                    vector<int>tem2;
                    for(int l=0;l<6;l++)
                    {
                        if(l==i||l==j||l==k)continue;
                        tem2.push_back(dp[l]);
                    }
                    sort(tem2.begin(),tem2.end());
                    if(tem1[0]+tem1[1]>tem1[2]&&tem2[0]+tem2[1]>tem2[2])
                    {
                        found=true;
                    }
                }
            }
        }
        if(found)
        {
            cout<<"Yes"<<endl;
        }
        else
        {
            cout<<"No"<<endl;
        }
    }
    return 0;
}